/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testing.jee.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author kreisera
 */
@Entity
@Table(name = "users")
public class User implements Serializable {

    private String id;

    public User() {
    }

    public User(String id) {
        this.id = id;
    }

    @Id
    //TODO: Pattern for usernames "fritzl"
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final User other = (User) obj;
        if (this.id == null || !this.id.equals(other.id)) {
            return false;
        }
        return true;
    }
}
